import {
	ref
} from 'vue';
const useConfig = () => {
	const activeItem = ref({});
	const loading = ref(false);

	// 选择专业
	const handleClick = (item) => {
		activeItem.value = activeItem.value.majorCode === item.majorCode ? {} : item;
		const panel = document.querySelector('.scroll-panel');
		panel.scrollTop = 0;
	};

	return {
		loading,
		activeItem,
		handleClick
	};
};

export default useConfig;
